/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.coreprincipals.polymorphism.polymorphism.impl;

import za.ac.cput.coreprincipals.polymorphism.polymorphism.Person;

/**
 *
 * @author babalwa
 */
public class StudentImpl extends Person{
    private int studentNumber;
    private String courseName;
    
    public StudentImpl(String name, String surname, int age, int id, int studentNumber, String courseName){
        super(name, surname, age, id);
        this.studentNumber = studentNumber;
        this.courseName = courseName;
    }    

    public int getStudentNumber() {
        return studentNumber;
    }

    public void setStudentNumber(int studentNumber) {
        this.studentNumber = studentNumber;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }
    
    @Override
    public String message(){
        return String.format("Name: %s\nSurname: %s\nAge: %d\nID: %d\nStudent Number: %d\nCourseName: %s", super.getName(), super.getSurname(), super.getAge(), super.getId(), this.studentNumber, this.courseName);
    }
}
